<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="vue/vue.min.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="button" value="切换" @click="flag=!flag">
        <h3 v-if="flag">v-if文本</h3>
        <h3 v-show="flag">v-show文本</h3>
    </div>
    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                flag: true
            }
        })
    </script>
</body>
</html>